/**
 * 
 */
package org.enea.xlab.lezione3.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;

/**
 * @author X-Lab
 */

@Entity
public class Supplier implements Serializable {
	
	
	private static final long serialVersionUID = 1L;
	@Id
	private Long supplierId;
	
	private String identificationCode;
	
	/**
	 * Molti supplier usano lo stesso transmissionType => ManyToOne 
	 */
	@ManyToOne
	private TransmissionType transmissionType;
	
	/**
	 * Molti supplier usano lo stesso translationType => ManyToOne 
	 */
	@ManyToOne
	private TranslationType translationType;
	
	/**
	 * Costruttore.
	 * Si lascia la generazione del supplierId al motore di persistenza (ORM - Object Relation Mapping)
	 * 
	 * @param identificationCode
	 * @param transmissionType
	 * @param translationType
	 */
	public Supplier(Long id, String identificationCode, TransmissionType transmissionType,
			TranslationType translationType) {
		
		this.supplierId = id;
		this.identificationCode = identificationCode;
		this.transmissionType = transmissionType;
		this.translationType = translationType;
	}
	
	public Long getSupplierId() {
		return supplierId;
	}
	public void setSupplierId(Long supplierId) {
		this.supplierId = supplierId;
	}
	public String getIdentificationCode() {
		return identificationCode;
	}
	public void setIdentificationCode(String identificationCode) {
		this.identificationCode = identificationCode;
	}
	public void setTransmissionType(TransmissionType transmissionType) {
		this.transmissionType = transmissionType;
	}
	public void setTranslationType(TranslationType translationType) {
		this.translationType = translationType;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public TransmissionType getTransmissionType() {
		return transmissionType;
	}
	public TranslationType getTranslationType() {
		return translationType;
	}

	

}
